package org.alanlau.springredis.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.data.redis.core.index.Indexed;

/**
 * 用户实体
 *
 * @author Alan
 * @data 2019/10/13 20:03
 */
@RedisHash("Person")
@Data
public class Person {
    @Id
    private String id;

    //建立索引
    @Indexed
    private String name;

    private Integer age;

    private String company;
}
